don't forget to offset the pointer by x/y_offset into the new window when
authorTim Janik <timj@gtk.org>
Mon, 7 Jan 2002 07:59:08 +0000 (07:59 +0000)
committerTim Janik <timj@src.gnome.org>
Mon, 7 Jan 2002 07:59:08 +0000 (07:59 +0000)
Mon Jan  7 08:48:23 2002  Tim Janik  <timj@gtk.org>

        * gtk/gtkdnd.c (gtk_drag_find_widget): don't forget to offset
        the pointer by x/y_offset into the new window when we found
        the drag destination.

        * gtk/gtkaccelmap.c (internal_change_entry): fix return code
        for simulation when the entry already contains the required
        accel key and mod.

13 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
docs/reference/gtk/tmpl/gtk-unused.sgml
docs/reference/gtk/tmpl/gtkaccelgroup.sgml
docs/reference/gtk/tmpl/gtkpaned.sgml
docs/reference/gtk/tmpl/gtktypeutils.sgml
gtk/gtkaccelmap.c
gtk/gtkdnd.c

index 63c0f59e042975f6b1bf3608b2b2a020d019723d..1af13f439d0689715dc0bae5a022c138817ef08c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Mon Jan  7 08:48:23 2002  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkdnd.c (gtk_drag_find_widget): don't forget to offset
+       the pointer by x/y_offset into the new window when we found
+       the drag destination.
+
+       * gtk/gtkaccelmap.c (internal_change_entry): fix return code
+       for simulation when the entry already contains the required
+       accel key and mod.
+
 2002-01-06  Matthias Clasen  <matthiasc@poet.de>
  
        * docs/debugging.txt: Replace GTK_NO_CHECK_CASTS by 
index 63c0f59e042975f6b1bf3608b2b2a020d019723d..1af13f439d0689715dc0bae5a022c138817ef08c 100644 (file)
@@ -1,3 +1,13 @@
+Mon Jan  7 08:48:23 2002  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkdnd.c (gtk_drag_find_widget): don't forget to offset
+       the pointer by x/y_offset into the new window when we found
+       the drag destination.
+
+       * gtk/gtkaccelmap.c (internal_change_entry): fix return code
+       for simulation when the entry already contains the required
+       accel key and mod.
+
 2002-01-06  Matthias Clasen  <matthiasc@poet.de>
  
        * docs/debugging.txt: Replace GTK_NO_CHECK_CASTS by 
index 63c0f59e042975f6b1bf3608b2b2a020d019723d..1af13f439d0689715dc0bae5a022c138817ef08c 100644 (file)
@@ -1,3 +1,13 @@
+Mon Jan  7 08:48:23 2002  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkdnd.c (gtk_drag_find_widget): don't forget to offset
+       the pointer by x/y_offset into the new window when we found
+       the drag destination.
+
+       * gtk/gtkaccelmap.c (internal_change_entry): fix return code
+       for simulation when the entry already contains the required
+       accel key and mod.
+
 2002-01-06  Matthias Clasen  <matthiasc@poet.de>
  
        * docs/debugging.txt: Replace GTK_NO_CHECK_CASTS by 
index 63c0f59e042975f6b1bf3608b2b2a020d019723d..1af13f439d0689715dc0bae5a022c138817ef08c 100644 (file)
@@ -1,3 +1,13 @@
+Mon Jan  7 08:48:23 2002  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkdnd.c (gtk_drag_find_widget): don't forget to offset
+       the pointer by x/y_offset into the new window when we found
+       the drag destination.
+
+       * gtk/gtkaccelmap.c (internal_change_entry): fix return code
+       for simulation when the entry already contains the required
+       accel key and mod.
+
 2002-01-06  Matthias Clasen  <matthiasc@poet.de>
  
        * docs/debugging.txt: Replace GTK_NO_CHECK_CASTS by 
index 63c0f59e042975f6b1bf3608b2b2a020d019723d..1af13f439d0689715dc0bae5a022c138817ef08c 100644 (file)
@@ -1,3 +1,13 @@
+Mon Jan  7 08:48:23 2002  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkdnd.c (gtk_drag_find_widget): don't forget to offset
+       the pointer by x/y_offset into the new window when we found
+       the drag destination.
+
+       * gtk/gtkaccelmap.c (internal_change_entry): fix return code
+       for simulation when the entry already contains the required
+       accel key and mod.
+
 2002-01-06  Matthias Clasen  <matthiasc@poet.de>
  
        * docs/debugging.txt: Replace GTK_NO_CHECK_CASTS by 
index 63c0f59e042975f6b1bf3608b2b2a020d019723d..1af13f439d0689715dc0bae5a022c138817ef08c 100644 (file)
@@ -1,3 +1,13 @@
+Mon Jan  7 08:48:23 2002  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkdnd.c (gtk_drag_find_widget): don't forget to offset
+       the pointer by x/y_offset into the new window when we found
+       the drag destination.
+
+       * gtk/gtkaccelmap.c (internal_change_entry): fix return code
+       for simulation when the entry already contains the required
+       accel key and mod.
+
 2002-01-06  Matthias Clasen  <matthiasc@poet.de>
  
        * docs/debugging.txt: Replace GTK_NO_CHECK_CASTS by 
index 63c0f59e042975f6b1bf3608b2b2a020d019723d..1af13f439d0689715dc0bae5a022c138817ef08c 100644 (file)
@@ -1,3 +1,13 @@
+Mon Jan  7 08:48:23 2002  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkdnd.c (gtk_drag_find_widget): don't forget to offset
+       the pointer by x/y_offset into the new window when we found
+       the drag destination.
+
+       * gtk/gtkaccelmap.c (internal_change_entry): fix return code
+       for simulation when the entry already contains the required
+       accel key and mod.
+
 2002-01-06  Matthias Clasen  <matthiasc@poet.de>
  
        * docs/debugging.txt: Replace GTK_NO_CHECK_CASTS by 
index f1f87c9b25d03ad1af4cb1ad28d2d2c95b9e76c4..a9a8d1a4216a449926c342b7aa58cbc19e3729a2 100644 (file)
@@ -1471,6 +1471,13 @@ If the window shrinks automatically when widgets within it shrink.
 @accel_mods: 
 @Returns: 
 
+<!-- ##### FUNCTION gtk_accel_group_get_type ##### -->
+<para>
+
+</para>
+
+@Returns: 
+
 <!-- ##### FUNCTION gtk_accel_group_handle_add ##### -->
 <para>
 
@@ -2527,6 +2534,12 @@ Internal function used by #GtkHPaned and #GtkVPaned
 @child1_req: 
 @child2_req: 
 
+<!-- ##### MACRO gtk_paned_handle_size ##### -->
+<para>
+Old name for gtk_paned_set_handle_size().
+</para>
+
+
 <!-- ##### FUNCTION gtk_paned_set_handle_size ##### -->
 <para>
 Set the the handle size to @size x @size pixels.
index acacceda040819377d976cb87d460d709dcb6c24..a9126ac0d96aef6f0defffa2fd6f581abecbae94 100644 (file)
@@ -38,14 +38,6 @@ An object representing and maintaining a group of accelerators.
 </para>
 
 
-<!-- ##### FUNCTION gtk_accel_group_get_type ##### -->
-<para>
-
-</para>
-
-@Returns: 
-
-
 <!-- ##### FUNCTION gtk_accel_group_new ##### -->
 <para>
 
@@ -68,6 +60,7 @@ Deprecated equivalent of g_object_unref().
 </para>
 
 
+
 <!-- ##### FUNCTION gtk_accel_group_connect ##### -->
 <para>
 
index 33f24283a36fe8945384778d815aef8365098b32..1e3b1df6b8c8ec0c96089ab436ac6c3f711913c9 100644 (file)
@@ -95,13 +95,6 @@ parameters. This is equivalent to
 @child: the child to add
 
 
-<!-- ##### MACRO gtk_paned_handle_size ##### -->
-<para>
-Old name for gtk_paned_set_handle_size().
-</para>
-
-
-
 <!-- ##### MACRO gtk_paned_gutter_size ##### -->
 <para>
 Old name for gtk_paned_set_gutter_size().
index 7008b5006cd183607708fced2bbaccba0e7b740f..305bd7e96226d762b101632f8e2931df7af12ce3 100644 (file)
@@ -146,6 +146,7 @@ Determines whether @type_class is a type of @otype.
 Gets the class of @tobj.
 </para>
 
+<!-- # Unused Parameters # -->
 @tobj: a #GtkObject.
 
 
index 3f7c8f5e171d9e1ee2f6bcd24a185b70cf500c86..6ba3fe32c038338c4c0a015e5bcf588dd9c919dd 100644 (file)
@@ -212,6 +212,10 @@ g_hash_table_slist_values (GHashTable *hash_table)
   return slist;
 }
 
+/* if simulate==TRUE, return whether accel_path can be changed to
+ * accel_key && accel_mods. otherwise, return whether accel_path
+ * was actually changed.
+ */
 static gboolean
 internal_change_entry (const gchar    *accel_path,
                       guint           accel_key,
@@ -220,7 +224,7 @@ internal_change_entry (const gchar    *accel_path,
                       gboolean        simulate)
 {
   GSList *node, *slist, *win_list, *group_list, *replace_list = NULL;
-  GHashTable *group_hm, *win_hm;
+  GHashTable *group_hm, *window_hm;
   gboolean change_accel, removable, can_change = TRUE, seen_accel = FALSE;
   GQuark entry_quark;
   AccelEntry *entry = accel_path_lookup (accel_path);
@@ -241,7 +245,11 @@ internal_change_entry (const gchar    *accel_path,
 
   /* if there's nothing to change, not much todo either */
   if (entry->accel_key == accel_key && entry->accel_mods == accel_mods)
-    return FALSE;
+    {
+      if (!simulate)
+       entry->changed = TRUE;
+      return simulate ? TRUE : FALSE;
+    }
 
   /* nobody's interested, easy going */
   if (!entry->groups)
@@ -258,7 +266,7 @@ internal_change_entry (const gchar    *accel_path,
   /* 1) fetch all accel groups affected by this entry */
   entry_quark = g_quark_try_string (entry->accel_path);
   group_hm = g_hash_table_new (NULL, NULL);
-  win_hm = g_hash_table_new (NULL, NULL);
+  window_hm = g_hash_table_new (NULL, NULL);
   for (slist = entry->groups; slist; slist = slist->next)
     g_hash_table_insert (group_hm, slist->data, slist->data);
 
@@ -269,13 +277,13 @@ internal_change_entry (const gchar    *accel_path,
       GtkAccelGroup *group = slist->data;
 
       for (node = group->acceleratables; node; node = node->next)
-       g_hash_table_insert (win_hm, node->data, node->data);
+       g_hash_table_insert (window_hm, node->data, node->data);
     }
   g_slist_free (group_list);
 
   /* 3) include all accel groups used by acceleratables */
-  win_list = g_hash_table_slist_values (win_hm);
-  g_hash_table_destroy (win_hm);
+  win_list = g_hash_table_slist_values (window_hm);
+  g_hash_table_destroy (window_hm);
   for (slist = win_list; slist; slist = slist->next)
     for (node = gtk_accel_groups_from_object (slist->data); node; node = node->next)
       g_hash_table_insert (group_hm, node->data, node->data);
index 44b7e821aae04fd3b942a2d11fba847beffb96bb..3e88358800ad2572bb52ef0943f95c003ceb5e47 100644 (file)
@@ -1266,7 +1266,7 @@ gtk_drag_find_widget (GtkWidget       *widget,
           new_allocation.x -= tx;
          new_allocation.y -= ty;
        }
-      
+
       while (window && window != widget->parent->window)
        {       
          gdk_window_get_size (window, &twidth, &theight);
@@ -1342,8 +1342,8 @@ gtk_drag_find_widget (GtkWidget       *widget,
        {
          data->found = data->callback (widget,
                                        data->context,
-                                       data->x - new_allocation.x,
-                                       data->y - new_allocation.y,
+                                       data->x - new_allocation.x - x_offset,
+                                       data->y - new_allocation.y - y_offset,
                                        data->time);
          /* If so, send a "drag_leave" to the last widget */
          if (data->found)